1. Field of the Invention
The present invention generally relates to memory management systems, and more particularly to a system for managing data in an asynchronous input/output (I/O) cache memory.
2. Discussion of the Related Art
In computer system design, a principal objective is to continually design faster and more efficient computer systems. In this regard, most conventional high-performance computer systems include cache memories. As is known, a cache memory is a high-speed memory that is positioned between a microprocessor and main memory in a computer system in order to improve system performance. Typically, cache memories (or caches) store copies of portions of main memory data that are actively being used by the central processing unit (CPU) while a program is running. Since the access time of a cache can be faster than that of main memory, the overall access time can be reduced.
Cache memory is used in data storage systems so that under typical conditions, a relatively large and usually slow main memory can be accessed at a relatively high rate. The cache memory is a relatively small high-speed memory that can store, at any given time, a portion of the data stored in the main memory. The cache memory also includes a cache directory or index of the data elements stored therein. The cache directory is referenced to provide an indication of whether or not each data element is located in the cache memory at any given time, and if so, the present location of the data element in the cache memory.
A data storage system is typically responsive to data access requests from a host computer. The data access requests, for example, include read and write requests. When a data storage system having a cache memory receives a request for access to data, the cache directory is inspected to determine whether the data element to be accessed resides in the cache memory. If so, the data storage system accesses the data in the cache memory. If not, the data storage system accesses the data in the main memory, and if the accessed data is likely to be accessed again in the near future, the accessed data is copied into the cache memory.
Although processor caches are perhaps the best known, other caches are known and used as well. For example, I/O caches are known for buffering and caching data between a system bus and an I/O bus. As will be further described below, certain system components, like a microprocessor and memory, are synchronized off a different clock than I/O transactions. When passing data between two differing frequency domains, it is usually desirable, if not necessary, to buffer the data in some way. One way that this is done is by passing the data through an I/O cache.
Because the cache memory has a capacity that is usually much smaller than the main memory, it is often necessary for data elements in the cache memory to be replaced or removed from the cache memory in order to provide space in the cache memory for new receiving data elements to be copied into the cache memory. In general, for the cache memory to be useful, the data elements replaced or removed from the cache memory must be less likely to be accessed in the near future than the data elements that are staged into the cache memory. This process is conventionally known as cache management.
A wide variety of methods and strategies are known for managing data within a cache memory to achieve optimum system performance. These methods often vary from system to system, and from application to application. Management methods may vary depending upon whether the cache memory is an electronic (e.g., integrated circuit) memory that is caching data on a disk drive (main memory), or whether the cache memory is a high speed electronic memory that is caching data for a slower speed electronic memory (main memory). Management methods may further vary depending upon the size of the cache memory.
Notwithstanding the various cache memory management methods, generally, when space is available within the cache memory for new data, the new data is simply copied into the available space, and logged in the directory/index of the cache. When, however, no additional space is available for new data then existing data must be discarded to make room for the new data. Also, the directory/index must be updated accordingly. As previously mentioned, there are a variety of methods that are known and implemented to determine which data within the cache to discard, each of which seeks to discard data that will not likely be used again (at least in the near term).
Notwithstanding the various known methods for cache memory management, further improvements are desired.